import { createApp } from 'vue'
import store from './store'
import App from './App.vue'
import router from './router'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import './assets/styles/main.scss'
// import DataV from '@dataview/datav-vue3';
// import DataV from '@jiaminghi/data-view'
import 'leaflet/dist/leaflet.css';
import hasDirective  from "./directives/has"
const app = createApp(App);
app.directive('has', hasDirective);
// app.use(DataV) // 全局注册 DataV 组件
app.use(store)
app.use(router)
app.use(ElementPlus, {
  // 全局配置遮罩层样式
  modal: {
    backdropClass: 'my-custom-backdrop'
  }
})
// 全局注册图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

app.mount('#app')